package com.example.codefilter.project.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 菜单管理
 * </p>
 *
 * @author LiJunYi
 * @since 2020-05-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_resource")
public class SysResource implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父资源ID，一级资源ID为0
     */
    @TableField("parent_id")
    private Integer parentId;

    /**
     * 资源名称
     */
    @TableField("name")
    private String name;

    /**
     * 菜单URL
     */
    @TableField("url")
    private String url;

    @TableField("permission")
    private String permission;

    /**
     * 类型  -1：根目录  0：目录   1：菜单   2：按钮
     */
    @TableField("type")
    private Integer type;

    /**
     * 资源图标
     */
    @TableField("icon")
    private String icon;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 菜单层级
     */
    @TableField("level")
    private String level;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;


}
